package hhhh;

import java.text.DecimalFormat;

/**
 * @Author MDD
 * @Description
 * @Version
 * @Date
 **/
public class Circle {
    DecimalFormat bl = new DecimalFormat(".##");
    double PI = 3.14;

    public void getArea(double radius){
        double area = PI*radius*radius;
        System.out.print("面积："+area);
    }

    public void getPerimeter(double radius){
        double periment = 2*PI*radius;
        String periment1 = bl.format(periment);
        System.out.print("周长："+periment1);
    }
}
